<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>箭头函数</title>
</head>
<body>
    <input type="text" id="textBox"/>
    <div id="output"></div>


    <script>

        const textBox = document.querySelector("#textBox");
        const output = document.querySelector("#output");
        textBox.addEventListener("keydown",(eve)=>{
            output.textContent = `you passed "${eve.key}"`;
            // output.textContent = `You pressed "${event.key}".`;
        });




    </script>
</body>
</html>